package com.pentakill.mo.auth.res.dao.impl;


import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import com.pentakill.mo.auth.res.dao.dao.ResDao;
import com.pentakill.mo.auth.res.vo.ResModel;
import com.pentakill.mo.util.base.BaseImpl;
import com.pentakill.mo.util.base.BaseQueryModel;


public class ResImpl extends BaseImpl<ResModel> implements ResDao{
	
	@Override
	protected void doQbc(DetachedCriteria criteria, BaseQueryModel qm) {
		// TODO Auto-generated method stub
	}

	public List<ResModel> getAllByEmpUuid(Long uuid) {
		System.out.println(uuid);
		String hql = "select res from EmpModel em join em.roleModels rm join rm.resModels res where em.uuid = ?";
		return this.getHibernateTemplate().find(hql ,uuid);
	}

}
